package com.feedback.ui;

import android.text.Editable;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.Toast;
import com.feedback.a.d;
import com.feedback.b.b;
import com.feedback.b.c;
import com.feedback.c.c;
import com.mobclick.android.t;
import java.util.concurrent.ExecutorService;
import org.json.JSONObject;

class a
  implements View.OnClickListener
{
  public void onClick(View paramView)
  {
    String str = FeedbackConversation.c(this.a).getText().toString();
    if ((str == null) || (str.trim().length() == 0));
    while (true)
    {
      return;
      if (str.length() <= 140)
        break;
      Toast.makeText(this.a, this.a.getString(t.a(this.a, "string", "UMContentTooLong")), 0).show();
    }
    Object localObject = null;
    try
    {
      JSONObject localJSONObject = b.a(this.a, str, FeedbackConversation.a(this.a).c);
      localObject = localJSONObject;
      FeedbackConversation.c(this.a).setText("");
      ((InputMethodManager)this.a.getSystemService("input_method")).hideSoftInputFromWindow(FeedbackConversation.c(this.a).getWindowToken(), 0);
      com.feedback.b.c.c(this.a, localObject);
      FeedbackConversation.a(this.a, com.feedback.b.c.b(this.a, FeedbackConversation.a(this.a).c));
      FeedbackConversation.b(this.a).a(FeedbackConversation.a(this.a));
      FeedbackConversation.b(this.a).notifyDataSetChanged();
      this.a.setSelection(FeedbackConversation.b(this.a).getCount() - 1);
      com.feedback.c.c localc = new com.feedback.c.c(localObject, this.a);
      FeedbackConversation.executorService.submit(localc);
    }
    catch (Exception localException)
    {
      while (true)
      {
        Toast.makeText(this.a, localException.getMessage(), 0).show();
        com.feedback.b.c.d(this.a, null);
        Log.d(FeedbackConversation.c, localException.getMessage());
      }
    }
  }
}